<!--
 * @Description: 
 * @Version: 2.0
 * @Autor: Seven
 * @Date: 2024-04-24 18:47:27
 * @LastEditors: Seven
 * @LastEditTime: 2024-04-24 18:56:27
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let arr = [1,2,3]
        let arr2 = arr.slice();
        arr2[0] =100;
        console.log(arr,arr2);

        arr.map(function(item,index,arr) {
            arr.splice(0,1);
            console.log(item,index,arr);
        });
    </script>
</body>
</html>